home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-12-03 | 2.1 KB | 50 lines | [TEXT/MPS ] |
- Instructions - The ToolServer Example
-
- Copyright Apple Computer, Inc. 1993
- All rights reserved.
-
- The ToolServer Example differs from other examples in that is not so much an
- example of ToolServer utilization as it is a package that provides a user-
- friendly interface for invoking ToolServer. Although the package can be modi-
- fied for use with a remote ToolServer, it is primarily directed at the use of
- ToolServer as a background task on the invoking machine.
-
- The example consists of three scripts: UserStartup•ToolServer,
- Quit•ToolServer, and UpdateToolServerEnv. A convenient place to put these is
- in your MPW folder. This will ensure that UserStartup•ToolServer is called
- during MPW startup and that Quit•ToolServer is called on quitting MPW.
-
- UserStartup•ToolServer has as its main function the creation of a "ToolServer"
- menu containing the items "Execute Selection", "Set Environment", "Open
- Output", and "Quit ToolServer", and the addition to the "Build" menu of the
- item "Background Build…". These menu items do the following:
-
- • Execute Selection--This simulates the behavior of pressing "Enter".
- ToolServer executes the same command line that the Shell would have
- executed had "Enter" been pressed.
-
- • Set Environment--This causes the script UpdateToolServerEnv to be run.
- The relevant portions of the Shell's environment with respect to "Set",
- "Export", and "Alias" commands will be replicated for ToolServer.
-
- • Open Output--The file {MPW}WorkSheet•TS, which has been defined as the
- standard error and output for ToolServer, will be opened as a window.
-
- • Quit ToolServer--This sends a "quit" message to ToolServer.
-
- • Background Build…--This behaves like the "Build…" item in the "Build"
- menu, except that the build steps are carried out in the background
- by ToolServer.
-
- Quit•ToolServer is run when quitting the Shell. It checks to see if any
- ToolServer requests are pending. If so, it sends a message requesting
- confirmation of the intent to quit. Before quitting the Shell, it causes
- a background ToolServer to quit.
-
- For further details, read the very complete comments to be found in the three
- scripts.
-
-
-
-
-